<script setup>
import CategoryCountAnalysis from "@/components/AdsPriceDistributionCount.vue";
import BookPopularityRank from "@/components/BookPopularityRank.vue";
import AdsPublisherPopularityRank from "@/components/AdsPublisherPopularityRank.vue";
import AdsDiscountRatioAnalysis from "@/components/AdsDiscountRatioAnalysis.vue";
import AdsPublishTrendAnalysis from "@/components/AdsPublishTrendAnalysis.vue";
import AdsPriceDistributionCount from "@/components/CategoryCountAnalysis.vue";
// import { BorderBox1 } from "@dataview/datav-vue3";  // 正常导入
</script>

<template>
  <div class="page-wrapper">
    <div class="header">当当网图书数据分析可视化</div>
    <div class="container">
      <div class="column">
        <div class="row"><AdsPublisherPopularityRank /></div>
        <div class="row"><BookPopularityRank /></div>
      </div>
      <div class="column">
        <div class="row"><CategoryCountAnalysis/></div>
        <div class="row"><AdsDiscountRatioAnalysis/></div>
      </div>
      <div class="column">
        <div class="row"><AdsPublishTrendAnalysis /></div>
        <div class="row"><AdsPriceDistributionCount/></div>
      </div>
     
    </div>
  </div>
</template>

<style scoped>
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.page-wrapper {
  background-color: #100C2A;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100vh;
}

.header {
  width: 100%;
  height: 30px;
  background-color: #100C2A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: white;
  margin: 20px 0 10px 0; /* 修改上边距为 20px */
}

.container {
  width: 100%;
  height: 100%; /* 修改为100% */
  display: flex;
  box-sizing: border-box;
}

.column {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* 确保内容均匀分布 */
  height: 100%; /* 修改为100% */
}

.row {
  flex: 1; /* 使行均等分配空间 */
  background-color: #100C2A;
  margin-bottom: 1px;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>